public class ENAService implements IceBox.Service
{
    public void
    start(String name, Ice.Communicator communicator, String[] args)
    {
	Boolean persistence = true;

	Ice.Properties properties = communicator.getProperties();
	String aux1 = properties.getProperty("persistence");
	String camera = properties.getProperty("camera");
	String index = properties.getProperty("index");

	if (aux1.equals("no"))
	    persistence = false;

        _adapter = communicator.createObjectAdapter("ENAServiceAdapter." + camera + "." + index);
	_adapter.add(new ENAI(communicator, persistence),
		     communicator.stringToIdentity("ena"));
        _adapter.activate();
    }

    public void
    stop()
    {
        _adapter.destroy();
    }

    private Ice.ObjectAdapter _adapter;
}